<template>
  <div class="home-page">
    <!-- 英雄区域 -->
    <section class="hero-section">
      <div class="hero-surface soft-gradient">
        <div class="hero-content animate-fade-in-up">
        <h1 class="hero-title">
          智能校验启动方案
          <span class="gradient-text">文档规范</span>
        </h1>
        <p class="hero-subtitle">
          基于AI技术的程序化启动方案校验系统，自动验证术语规范，提高工作效率
        </p>
        </div>
        <div class="hero-visual simple-visual" />
      </div>
    </section>
    
    <!-- 功能卡片区域 -->
    <section class="features-section">
      <div class="section-header animate-fade-in-up">
        <h2>核心功能</h2>
        <p>一站式启动方案校验解决方案</p>
      </div>
      
      <div class="features-grid">
        <div 
          class="feature-card modern-card animate-slide-in-right" 
          @click="$router.push('/device-template')"
          style="animation-delay: 0.1s"
        >
          <div class="feature-icon">
            <el-icon><Upload /></el-icon>
          </div>
          <h3>设备模板管理</h3>
          <p>上传设备导入模板，建立标准化的设备数据库，为后续校验提供基础数据支撑</p>
          <div class="feature-actions">
            <el-button type="primary" class="modern-btn">开始使用</el-button>
          </div>
        </div>
        
        <div 
          class="feature-card modern-card animate-slide-in-right" 
          @click="$router.push('/startup-plan')"
          style="animation-delay: 0.2s"
        >
          <div class="feature-icon">
            <el-icon><Document /></el-icon>
          </div>
          <h3>启动方案校验</h3>
          <p>智能解析启动方案文档，自动校验操作步骤的术语规范，确保文档质量</p>
          <div class="feature-actions">
            <el-button type="primary" class="modern-btn">开始校验</el-button>
          </div>
        </div>
        
        <div 
          class="feature-card modern-card animate-slide-in-right" 
          @click="$router.push('/terminology')"
          style="animation-delay: 0.3s"
        >
          <div class="feature-icon">
            <el-icon><Setting /></el-icon>
          </div>
          <h3>术语库管理</h3>
          <p>管理二次设备和一次设备术语库，维护校验标准，确保校验规则的准确性</p>
          <div class="feature-actions">
            <el-button type="primary" class="modern-btn">管理术语</el-button>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script setup lang="ts">
import { Document, Check, Download, Upload, Setting } from '@element-plus/icons-vue'
</script>

<style scoped>
.home-page {
  min-height: 100vh;
}

.hero-section {
  display: flex;
  align-items: center;
  min-height: 240px;
  gap: 32px;
  margin: 4px 0 16px;
}

.hero-surface {
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(107,124,255,0.12), rgba(59,87,224,0.05));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.hero-content {
  flex: 1;
  max-width: 680px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.hero-visual {
  flex: 1;
  position: relative;
  height: 200px;
}

.simple-visual {
  background: radial-gradient(120px 80px at 40% 40%, rgba(79, 107, 237, 0.15), transparent),
              radial-gradient(160px 100px at 70% 60%, rgba(34, 197, 94, 0.15), transparent);
  border-radius: 16px;
}

.floating-card {
  position: absolute;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

.floating-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.floating-card .el-icon {
  font-size: 32px;
  color: var(--primary-color);
}

.floating-card span {
  font-weight: 600;
  color: var(--text-primary);
}

.card-1 {
  top: 20px;
  left: 20px;
  animation-delay: 0s;
}

.card-2 {
  top: 120px;
  right: 40px;
  animation-delay: 2s;
}

.card-3 {
  bottom: 40px;
  left: 60px;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.feature-card {
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
  font-size: 32px;
  box-shadow: var(--shadow-md);
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.feature-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.feature-actions {
  margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 60px;
  }
  
  .hero-visual {
    height: 300px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .hero-stats {
    gap: 32px;
  }
  
  .stat-number {
    font-size: 24px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .feature-card {
    padding: 32px 24px;
  }
}
</style>